using System.Collections;

namespace NUnit.Behave
{
    public class AddVerb
    {
        protected readonly string subject;
        protected ArrayList actionCatalog = new ArrayList();

        public AddVerb(string verbSubject)
        {
            subject = verbSubject;
        }

        public void AddActionValue<T>(T actionValue)
        {
            actionCatalog.Add(actionValue);
        }

        public string Subject
        {
            get { return subject; }
        }

        public string GetStringValueOfActionValue()
        {
            return actionCatalog[0].ToString();
        }

        public override string ToString()
        {
            return FormatToString(subject, GetStringValueOfActionValue());
        }

        public static string FormatToString<T>(string message, T actionValue)
        {
            return message + " " + actionValue.ToString();
        }
    }
}